<?php
namespace prog_index\controller {
    use prog_index\lib as progLib;
    
    \defined( '_JEXEC' ) or die( 'Restricted access' );

    class index extends progLib\Controller {
        protected $_r2c           = \NULL;
        
        public function testAction(){
    //        $this->user;        // User object
    //        $this->dbAdapter;   // DatabaseAdapter object
    //        $this->config;      // an array(
    //                            //   'dbAdapter_MainDatabaseConnectionData'=> deepDynamicContainer object
    //                            //   'inProductionMode'=> boolean
    //                            //   'requestObject_type'=> string (eg. http_GET_Request)
    //                            //   'requestObject'=> mix depending on requestObject_type
    //                            // )
    
            echo "Hello from ".__METHOD__." of program Index !!!<br />\n";
            echo "<pre> Params:";
            var_dump(func_get_args());
            print_r($this->user->get_groups());
        }

        function echo2client(){
            $args = \func_get_args();
            $str1 = '';
            foreach ($args as $key => $value) {
                $str1 .= "$key:$value, ";
            }
            $this->_r2c->data = 'hello from method '.__METHOD__.', '.$str1;
            $this->_r2c->send(); 
        }
    }
}